﻿@{
    ViewBag.Title = "重置密码";
    Layout = "~/Views/Shared/_LayoutForm.cshtml";
}
<script src="~/Content/Scripts/jquery/jQuery.md5.js"></script>
<script>
    //保存事件
    function AcceptClick() {
        if (!CheckDataValid('#form1')) {
            return false;
        }
        var Password = $("#Password");
        var NewPassword = $("#NewPassword");
        if (Password.val() != NewPassword.val()) {
            tipCss("#NewPassword", "您两次输入的密码不一致");
            return false;
        }
        if (confirm('注：请牢记当前设置密码，您确认要重置新密码？')) {
            Loading(true, "正在提交数据...");
            window.setTimeout(function () {
                var postData = {
                    KeyValue: GetQuery('KeyValue'),
                    Password: $.md5($("#Password").val())
                }
                AjaxJson("/CommonModule/User/ResetPasswordSubmit", postData, function (data) {
                    tipDialog(data.Message, 3, data.Code);
                    closeDialog();
                });
            }, 200);
        }
    }
</script>
<form id="form1" style="margin: 1px">
    <div id="message" style="display: none"></div>
    <table class="form">
        <tr>
            <th class="formTitle">登录账户：
            </th>
            <td class="formValue">
                @ViewBag.Account
            </td>
        </tr>
        <tr>
            <th class="formTitle">新密码：
            </th>
            <td class="formValue">
                <input id="Password" type="password" class="txt required" datacol="yes" err="新密码" checkexpession="NotNull" />
            </td>
        </tr>
        <tr>
            <th class="formTitle">确认密码：
            </th>
            <td class="formValue">
                <input id="NewPassword" type="password" class="txt required" datacol="yes" err="确认密码" checkexpession="NotNull" />
            </td>
        </tr>
    </table>
</form>
